package com.gs.process.demo.handler;

import com.gs.process.demo.service.LeavesService;
import com.gs.process.core.annotation.ProcessHandler;
import com.gs.process.core.handler.ProcessFinishedHandler;
import com.gs.process.model.ApprovalDetails;

import javax.annotation.Resource;

/**
 * @author Shuai Guo
 * @version 1.0
 * @description
 * @date 2021/7/13
 */
@ProcessHandler(value = "leaves")
public class LeavesHandler implements ProcessFinishedHandler {

    @Resource
    private LeavesService leavesService;

    @Override
    public void postAllowHandle(String jsonForm, ApprovalDetails formAudit) {
        leavesService.find();
        System.out.println(jsonForm);
    }

    @Override
    public void postRefuseHandle(String jsonForm, ApprovalDetails formAudit) {
        System.out.println(jsonForm);
    }
}
